<?php $this->load->view('includes/header'); ?>

<?php
	$name = array(
		'name'		=>		'name',
		'id'		=>		'name',
		'value'		=>		set_value('name')
	);
		
	$base_price = array(
		'name'		=>		'base_price',
		'id'		=>		'base_price',
		'value'		=>		set_value('base_price')
	);
	
	$sale_endtime = array(
		'name'		=>		'sale_endtime',
		'id'		=>		'sale_endtime',
		'value'		=>		set_value('sale_endtime')
	);
	
	$photo = array(
		'name'		=>		'photo',
		'id'		=>		'photo',
		'value'		=>		''
		);
	
	$description = array(
		'name'		=>		'description',
		'id'		=>		'description',
		'value'		=>		set_value('description')
	);

	?>
	
	
<h1>Sell an Object</h1>

<div id="register">

<fieldset>

	<legend>Object Information</legend>
	
	<?php echo form_open('products/create_object'); ?>
		
		<label>Name</label>
		<?php echo form_input($name); ?>
		
		<label>Base Price</label>
		<?php echo form_input($base_price); ?>
		
		<label>Sale Endtime</label>
		<?php echo form_input($sale_endtime); ?>
	
</fieldset>

<fieldset>

	<legend>Object Description</legend>
	
		<label>Photo</label>
		<?php echo form_upload('photo'); ?>		
		
		<label>Description</label>
		<?php echo form_input($description); ?>
		
		<?php echo form_submit('submit', 'Sell Object'); ?>
	
	<?php echo validation_errors('<p class="error">'); ?>
	
</fieldset>

</div>

<?php $this->load->view('includes/footer'); ?>
